using System;
using System.Text;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using RealState.BusinessObjects;
using RealState.DAL;

namespace RealState.BLL
{
	public class ImageTypesBLL
	{
		private ImageTypesDAO _ImageTypesDAO;

		public ImageTypesDAO ImageTypesDAO
		{
			get { return _ImageTypesDAO; }
			set { _ImageTypesDAO = value; }
		}

		public ImageTypesBLL()
		{
			ImageTypesDAO = new ImageTypesDAO();
		}
		public List<ImageTypes> GetImageTypess()
		{
			try
			{
				return ImageTypesDAO.GetImageTypess();
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
		public ImageTypes GetImageTypes(int Id)
		{
			try
			{
				return ImageTypesDAO.GetImageTypes(Id);
			}
			catch(Exception ex)
			{
				throw ex;
			}
		}
		public int AddImageTypes(ImageTypes oImageTypes)
		{
			try
			{
				return ImageTypesDAO.AddImageTypes(oImageTypes);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int UpdateImageTypes(ImageTypes oImageTypes)
		{
			try
			{
				return ImageTypesDAO.UpdateImageTypes(oImageTypes);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveImageTypes(ImageTypes oImageTypes)
		{
			try
			{
				return ImageTypesDAO.RemoveImageTypes(oImageTypes);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public int RemoveImageTypes(int Id)
		{
			try
			{
				return ImageTypesDAO.RemoveImageTypes(Id);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public List<ImageTypes> DeserializeImageTypess(string Path)
		{
			try
			{
				return GenericXmlSerializer<List<ImageTypes>>.Deserialize(Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		public void SerializeImageTypess(string Path, List<ImageTypes> ImageTypess)
		{
			try
			{
				GenericXmlSerializer<List<ImageTypes>>.Serialize(ImageTypess, Path);
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
	}
}
